package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.MemberGeneralSettingsMapper;
import com.ruoyi.system.domain.MemberGeneralSettings;
import com.ruoyi.system.service.IMemberGeneralSettingsService;

/**
 * 会员通用设置（存储会员系统的全局配置规则）Service业务层处理
 *
 * @author ruoyi
 * @date 2025-05-14
 */
@Service
public class MemberGeneralSettingsServiceImpl implements IMemberGeneralSettingsService
{
    @Autowired
    private MemberGeneralSettingsMapper memberGeneralSettingsMapper;

    /**
     * 通过id查询会员通用设置
     *
     * @param id 会员通用设置主键
     * @return 会员通用设置
     */
    @Override
    public MemberGeneralSettings selectMemberGeneralSettingsById(Long id)
    {
        return memberGeneralSettingsMapper.selectMemberGeneralSettingsById(id);
    }

    /**
     * 查询会员通用设置列表
     *
     * @param memberGeneralSettings 会员通用设置
     * @return 会员通用设置
     */
    @Override
    public List<MemberGeneralSettings> selectMemberGeneralSettingsList(MemberGeneralSettings memberGeneralSettings)
    {
        return memberGeneralSettingsMapper.selectMemberGeneralSettingsList(memberGeneralSettings);
    }

    /**
     * 新增会员通用设置
     *
     * @param memberGeneralSettings 会员通用设置
     * @return 结果
     */
    @Override
    public int insertMemberGeneralSettings(MemberGeneralSettings memberGeneralSettings)
    {
        return memberGeneralSettingsMapper.insertMemberGeneralSettings(memberGeneralSettings);
    }

    /**
     * 修改会员通用设置
     *
     * @param memberGeneralSettings 会员通用设置
     * @return 结果
     */
    @Override
    public int updateMemberGeneralSettings(MemberGeneralSettings memberGeneralSettings)
    {
        return memberGeneralSettingsMapper.updateMemberGeneralSettings(memberGeneralSettings);
    }

    /**
     * 通过id批量删除会员通用设置信息
     *
     * @param ids 需要删除的会员通用设置主键
     * @return 结果
     */
    @Override
    public int deleteMemberGeneralSettingsByIds(Long[] ids)
    {
        return memberGeneralSettingsMapper.deleteMemberGeneralSettingsByIds(ids);
    }

    /**
     * 通过id删除会员通用设置信息
     *
     * @param id 会员通用设置主键
     * @return 结果
     */
    @Override
    public int deleteMemberGeneralSettingsById(Long id)
    {
        return memberGeneralSettingsMapper.deleteMemberGeneralSettingsById(id);
    }
}
